<div class="headline">
  <h2>
    <?php echo $this->translate('Books');?>
  </h2>
  <?php if( count($this->navigation) > 0 ): ?>
    <div class="tabs">
      <?php
        echo $this->navigation()
          ->menu()
          ->setContainer($this->navigation)
          ->render();
      ?>
    </div>
  <?php endif; ?>
</div>
<table>

    <?php $count = 1; ?>
    <?php foreach ($this->books as $book) : ?>
        <?php
        if ($count % 5 == 1) {
            echo "<tr>";
        }
        ?>

    <td>                      
        <a href="<?php echo $this->url(array('action' => 'detailbook', 'book_id' => $book->book_id), 'book_general', true);?>"><img src="<?php echo $this->baseUrl().'/public/PictureBook/'.$book->image;?>" width="100px" height="160px"></a><br>
        <b>Title: </b><?php echo $book->title; ?><br>
        <b>Author: </b><?php echo $book->author; ?><br>
        <b>Description: </b><?php echo $book->description; ?><br>
        <b>Owner: </b><?php echo $book->owner_id; ?><br>
        <b>Creation date: </b><?php echo $book->creation_date; ?><br>
        <b>Price: </b><?php echo $book->price; ?><br>
        <?php //====================================if($this->id == 1) : ?>
        <a href="<?php echo $this->url(array('action' => 'edit', 'book_id' => $book->book_id), 'book_general', true);?>">Edit</a> | <a href="<?php echo $this->url(array('action' => 'delete', 'book_id' => $book->book_id), 'book_general', true);?>">Delete</a> | <a href="<?php echo $this->url(array('action' => 'detailbook', 'book_id' => $book->book_id), 'book_general', true);?>">Detail</a> 
        <?php //================================endif;?>        
    </td>
     <?php
        if ($count % 5 == 0) {
            echo "</tr>";
        }
        $count++;
        ?>
    <?php endforeach; ?>

</table>

<?php echo $this->paginationControl($this->books, null, null, array(
  'pageAsQuery' => true
)); ?>